//
//  mainSreenViewController.m
//  ImitateZH
//
//  Created by lanou3g on 16/3/1.
//  Copyright © 2016年 Highyoung. All rights reserved.
//

#import "mainSreenViewController.h"
#import "mainTableViewCell.h"
@interface mainSreenViewController ()<UITableViewDelegate,UITableViewDataSource>

@end
static NSString *cellId = @"cellid";
@implementation mainSreenViewController

#pragma mark - load
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor cyanColor];
    
    
    [self SetTableview];
    [self setData];
}

-(void) SetTableview {
    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0,kSCreenWidth, kSCreenHeight) style:(UITableViewStylePlain)];
    
    [self.tableView registerNib:[UINib nibWithNibName:@"mainTableViewCell" bundle:nil] forCellReuseIdentifier:cellId];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.view addSubview:self.tableView];
}

-(void) setData{
    
}

#pragma maek - tableViewDelegate
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    mainTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (cell == nil) {
        cell = [[mainTableViewCell alloc] initWithStyle:(UITableViewCellStyleSubtitle) reuseIdentifier:cellId];
    }
    return cell;
    
}

#pragma mark ---cell点击事件
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
